-
Notifications
You must be signed in to change notification settings - Fork 1.5k
update fullstack examples in /orm for v7
#8311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughSwitches multiple example projects to generate Prisma Client locally (provider → "prisma-client", engineType = "client", custom output paths), updates imports to those generated client modules, bumps Prisma-related packages, adjusts Nuxt configs/tsconfigs, updates seeding (Nuxt idempotent upserts), and adds generated dirs to .gitignore. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant App as Application code
participant Gen as Generated Prisma Client
participant Ext as withAccelerate extension
Note over App,Gen: High-level Prisma client init & usage
App->>Gen: import { PrismaClient } from './generated/.../client'
App->>Gen: const client = new PrismaClient()
App->>Ext: call withAccelerate()
Gen->>Gen: client.$extends(withAccelerate()).$extends(customExtensions)
App->>Gen: client.query / client.upsert(...)
alt success
Gen-->>App: results
else error
Gen-->>App: throws error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-22T12:12:24.602ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
🔇 Additional comments (4)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (9)
orm/react-router-7/app/generated/prisma/browser.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/client.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/commonInputTypes.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/enums.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/internal/class.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/internal/prismaNamespace.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/internal/prismaNamespaceBrowser.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/models.tsis excluded by!**/generated/**orm/react-router-7/app/generated/prisma/models/Todo.tsis excluded by!**/generated/**
📒 Files selected for processing (3)
orm/react-router-7/app/lib/prisma.ts(1 hunks)orm/react-router-7/package.json(1 hunks)orm/react-router-7/prisma/schema.prisma(1 hunks)
🔇 Additional comments (1)
orm/react-router-7/prisma/schema.prisma (1)
7-11: Approve Prisma v7 generator configuration. Generator block correctly uses provider "prisma-client", specifies the required custom output path, and includes engineType = "client" for JS-only usage; build configs require no updates. (prisma.io)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (10)
orm/nextjs/app/generated/prisma/browser.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/client.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/commonInputTypes.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/enums.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/internal/class.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/internal/prismaNamespace.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/internal/prismaNamespaceBrowser.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/models.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/models/Post.tsis excluded by!**/generated/**orm/nextjs/app/generated/prisma/models/User.tsis excluded by!**/generated/**
📒 Files selected for processing (4)
orm/nextjs/lib/prisma.ts(1 hunks)orm/nextjs/package.json(2 hunks)orm/nextjs/prisma/schema.prisma(1 hunks)orm/nextjs/prisma/seed.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Applied to files:
orm/nextjs/prisma/seed.tsorm/nextjs/package.json
🔇 Additional comments (5)
orm/nextjs/prisma/seed.ts (1)
1-1: LGTM! Import path correctly updated.The import path change aligns with the new generator output configuration in
schema.prisma(line 11:output = "../app/generated/prisma").orm/nextjs/lib/prisma.ts (1)
1-1: LGTM! Import path correctly updated.The import path change is consistent with the generator output configuration and other files in this PR.
orm/nextjs/package.json (2)
17-17: LGTM! Extension correctly moved to runtime dependencies.Moving
@prisma/extension-acceleratefrom devDependencies to dependencies is correct since it's used at runtime in bothlib/prisma.tsandprisma/seed.ts.
32-34: No modifications needed; the existingpostinstallscript ensuresprisma generateruns before seeding.orm/nextjs/prisma/schema.prisma (1)
8-12: Configuration valid for Prisma v7
This generator block uses the correct v7 syntax—provider="prisma-client", explicit output path, and engineType="client". Ensure you install the matching JS driver adapter (e.g. @prisma/adapter-pg) when using the "client" engine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
orm/nuxt/prisma/db.ts (1)
3-6: Add required Prisma Accelerate settings
- In
orm/nuxt/prisma/schema.prisma, update your datasource block:datasource db { provider = "<your_provider>" url = env("DATABASE_URL") directUrl = env("DIRECT_URL") // needed for migrations with Accelerate }- Update your environment (or
.env.example) soDATABASE_URLis aprisma://…Accelerate URL andDIRECT_URLpoints to your primary database connection string.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (20)
orm/nuxt-prisma-module/prisma/generated/prisma/browser.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/client.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/commonInputTypes.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/enums.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/internal/class.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/internal/prismaNamespace.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/internal/prismaNamespaceBrowser.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/models.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/models/Post.tsis excluded by!**/generated/**orm/nuxt-prisma-module/prisma/generated/prisma/models/User.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/browser.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/client.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/commonInputTypes.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/enums.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/internal/class.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/internal/prismaNamespace.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/internal/prismaNamespaceBrowser.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/models.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/models/Post.tsis excluded by!**/generated/**orm/nuxt/prisma/generated/prisma/models/User.tsis excluded by!**/generated/**
📒 Files selected for processing (22)
orm/betterauth-nextjs/.env.example(1 hunks)orm/betterauth-nextjs/package.json(1 hunks)orm/betterauth-nextjs/prisma/schema.prisma(1 hunks)orm/betterauth-nextjs/src/lib/prisma.ts(1 hunks)orm/nuxt-prisma-module/.env.example(1 hunks)orm/nuxt-prisma-module/README.md(1 hunks)orm/nuxt-prisma-module/lib/prisma.ts(1 hunks)orm/nuxt-prisma-module/nuxt.config.ts(1 hunks)orm/nuxt-prisma-module/package.json(1 hunks)orm/nuxt-prisma-module/prisma/schema.prisma(1 hunks)orm/nuxt-prisma-module/prisma/seed.ts(2 hunks)orm/nuxt-prisma-module/server/api/user-exists.ts(1 hunks)orm/nuxt-prisma-module/tsconfig.json(1 hunks)orm/nuxt/.env.example(1 hunks)orm/nuxt/README.md(4 hunks)orm/nuxt/eslint.config.mjs(1 hunks)orm/nuxt/nuxt.config.ts(1 hunks)orm/nuxt/package.json(1 hunks)orm/nuxt/prisma/db.ts(1 hunks)orm/nuxt/prisma/schema.prisma(1 hunks)orm/nuxt/prisma/seed.ts(1 hunks)orm/nuxt/tsconfig.json(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Applied to files:
orm/nuxt/package.jsonorm/nuxt-prisma-module/prisma/seed.ts
📚 Learning: 2025-08-22T12:12:43.161Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-turbopack/components/quotes.tsx:1-1
Timestamp: 2025-08-22T12:12:43.161Z
Learning: In Next.js applications using Prisma, the connection() function from 'next/server' serves a different purpose than 'export const dynamic = force-dynamic'. The connection() function ensures proper database connection context and request isolation, while dynamic = 'force-dynamic' only controls rendering strategy. Both should be used together and are not redundant.
Applied to files:
orm/nuxt/prisma/db.ts
🧬 Code graph analysis (1)
orm/nuxt-prisma-module/lib/prisma.ts (2)
orm/nuxt-prisma-module/prisma/generated/prisma/client.ts (2)
PrismaClient(37-37)PrismaClient(38-38)orm/nuxt-prisma-module/prisma/generated/prisma/internal/class.ts (1)
PrismaClient(130-237)
🪛 dotenv-linter (3.3.0)
orm/nuxt-prisma-module/.env.example
[warning] 1-1: [EndingBlankLine] No blank line at the end of the file
(EndingBlankLine)
orm/nuxt/.env.example
[warning] 1-1: [EndingBlankLine] No blank line at the end of the file
(EndingBlankLine)
orm/betterauth-nextjs/.env.example
[warning] 2-2: [UnorderedKey] The BETTER_AUTH_SECRET key should go before the DATABASE_URL key
(UnorderedKey)
🪛 markdownlint-cli2 (0.18.1)
orm/nuxt/README.md
150-150: Images should have alternate text (alt text)
(MD045, no-alt-text)
154-154: Images should have alternate text (alt text)
(MD045, no-alt-text)
158-158: Images should have alternate text (alt text)
(MD045, no-alt-text)
162-162: Images should have alternate text (alt text)
(MD045, no-alt-text)
🔇 Additional comments (29)
orm/betterauth-nextjs/.env.example (1)
1-2: LGTM! DATABASE_URL and BETTER_AUTH_SECRET placeholders added correctly.The addition of
DATABASE_URL=aligns with the Prisma client migration across the PR, and theBETTER_AUTH_SECRET=change-meplaceholder is a clear reminder for developers to set a secure value.orm/nuxt-prisma-module/.env.example (1)
1-1: LGTM! DATABASE_URL placeholder added.The
DATABASE_URL=placeholder is consistent with Prisma configuration requirements and aligns with similar changes across the PR.orm/nuxt/prisma/db.ts (1)
2-2: LGTM! Import path updated to generated client.The import path
../prisma/generated/prisma/clientcorrectly references the generated Prisma client based on theoutputconfiguration inorm/nuxt/prisma/schema.prisma.orm/nuxt/.env.example (1)
1-1: LGTM! DATABASE_URL placeholder added.The
DATABASE_URL=placeholder is consistent with Prisma configuration requirements and aligns with similar changes across the PR.orm/nuxt/prisma/seed.ts (1)
1-4: LGTM! Import path and Accelerate extension updated correctly.The import path
../prisma/generated/prisma/clientcorrectly references the generated Prisma client, and the addition ofwithAccelerate()aligns with the changes inorm/nuxt/prisma/db.ts.orm/nuxt-prisma-module/tsconfig.json (1)
3-17: LGTM! TypeScript configuration updated to use project references.The change from
extendsto explicitreferencesaligns with modern Nuxt 3 TypeScript configuration patterns and enables better composite project support. Ensurenuxt prepare(ornuxt build) is run before TypeScript type checking to generate the referenced.nuxt/tsconfig.*.jsonfiles.orm/nuxt/prisma/schema.prisma (1)
4-4: Import path consistency verified. Bothdb.tsandseed.tsimport from../prisma/generated/prisma/client, matching the schema’soutput = "./generated/prisma".orm/nuxt-prisma-module/nuxt.config.ts (2)
5-5: Confirm default autoSetupPrisma behavior
Emptyprisma: {}relies on the module’s defaultautoSetupPrisma(true). Validate via the @prisma/nuxt config docs (https://pris.ly/configure-prisma-nuxt) or by running the module’s setup tests to ensure the Prisma client is still auto-generated.
7-7: Confirm compatibilityDate: ThecompatibilityDate(ISO YYYY-MM-DD) pins Nuxt’s presets and is set to2025-07-15(past relative to Oct 2025); verify this specific date is intentional and update if you need newer behavior.orm/nuxt-prisma-module/lib/prisma.ts (2)
1-2: LGTM! Import paths updated correctly.The imports now reference the locally generated Prisma client at
../prisma/generated/prisma/clientand add the Accelerate extension, aligning with the Prisma v7 migration strategy across the PR.
7-7: LGTM! Accelerate extension properly chained.The
withAccelerate()extension is correctly applied before the custom extension. Extension order matters—Accelerate must be applied first to ensure the customexistsmethod operates within the accelerated context.orm/nuxt-prisma-module/server/api/user-exists.ts (1)
1-1: LGTM! Import path updated to explicit relative path.Replacing the tilde import (
~/lib/prisma) with an explicit relative path (../../lib/prisma) improves portability and clarity. The path is correct for theserver/api/directory structure.orm/nuxt-prisma-module/README.md (2)
24-58: LGTM! Documentation updated for Prisma Postgres setup.The updated setup flow clearly guides users through:
- Installing dependencies
- Initializing Prisma Postgres with
--dbflag- Configuring environment variables
- Running migrations and seeding
- Starting the development server
The instructions align with the Prisma v7 migration and Accelerate extension usage demonstrated in the code changes.
68-78: LGTM! Accelerate extension usage documented.The documentation correctly shows how to extend PrismaClient with Accelerate, which matches the implementation in
lib/prisma.ts. This helps users understand the Prisma Postgres integration requirement.orm/nuxt/eslint.config.mjs (1)
1-6: LGTM! Standard Nuxt ESLint configuration.This follows the standard pattern for Nuxt 4 ESLint configuration, wrapping the auto-generated config from
.nuxt/eslint.config.mjswith a placeholder for custom rules. The configuration will be functional after runningnuxt prepareornpm run postinstall.orm/nuxt/nuxt.config.ts (2)
2-2: Verify the compatibility date.The
compatibilityDateis set to'2025-07-15', but that date is in the past relative to the current month (October 2025). Verify this is intentional. Compatibility dates typically reference dates when breaking changes were introduced, not future dates.If this was intended to be 2024-07-15, apply this diff:
- compatibilityDate: '2025-07-15', + compatibilityDate: '2024-07-15',
3-4: LGTM! Devtools and ESLint module enabled.Enabling devtools and adding the
@nuxt/eslintmodule aligns with Nuxt 4 best practices and the neweslint.config.mjsfile introduced in this PR.orm/nuxt/package.json (3)
13-19: LGTM! Dependencies updated for Prisma v7 migration.All Prisma-related dependencies are correctly aligned at version 6.16.3, and the Accelerate extension (2.0.2) is added. Nuxt 4 (4.1.2) and Vue ecosystem updates (3.5.22, router 4.5.1) are current and compatible.
22-24: LGTM! Dev dependencies updated.The addition of
tsx(4.20.6) supports the TypeScript seed script, and Prisma dev dependency is aligned at 6.16.3.
26-28: Seed script configuration is correct.
orm/nuxt/prisma/seed.tsexists with valid PrismaClient setup and seeding logic, andprisma.seedin package.json correctly points to"tsx prisma/seed.ts".orm/betterauth-nextjs/src/lib/prisma.ts (1)
1-1: LGTM! Import path updated for generated client location.The import path now includes the
/clientsuffix (@/generated/prisma/client), aligning with the Prisma v7 generator configuration changes whereoutputis set to./generated/prismaand the client is exported from the/clientsubpath.orm/nuxt/tsconfig.json (1)
4-16: Critical: TypeScript reference paths point to wrong directory.The
referencesarray points to./.nuxt/tsconfig.*.jsonfiles, but these paths would resolve toorm/nuxt/.nuxt/. However, based on the AI summary noting these are "references to four generated Nuxt tsconfig files" inorm/nuxt-prisma-module/.nuxt/, this appears to be a copy-paste error from theorm/nuxt-prisma-module/tsconfig.jsonfile.Verify the correct paths. If this is the
orm/nuxt/project, the references should point to its own.nuxtdirectory:"references": [ { "path": "./.nuxt/tsconfig.app.json" }, { "path": "./.nuxt/tsconfig.server.json" }, { "path": "./.nuxt/tsconfig.shared.json" }, { "path": "./.nuxt/tsconfig.node.json" } ]If these files don't exist in
orm/nuxt/.nuxt/after runningnuxt prepare, this indicates a configuration problem that must be resolved.Likely an incorrect or invalid review comment.
orm/nuxt-prisma-module/prisma/seed.ts (2)
52-56: LGTM! Idempotent seed implementation.The switch to
upsertwithwhere: { email: u.email }ensures the seed script can be run multiple times without creating duplicate users. This is a best practice for seed scripts.
1-1: No changes needed for Prisma client import path.
Thelib/prisma.tsfile re-exports from../prisma/generated/prisma/client, matching theoutput = "./generated/prisma"setting inschema.prisma.orm/nuxt/README.md (1)
118-122: LGTM! Documentation correctly reflects the new client generation step.The addition of the
npx prisma generatestep is essential for the Rust-free client architecture introduced in this PR. This ensures users generate the local client before running migrations or seeds.orm/nuxt-prisma-module/package.json (2)
27-27: LGTM! Seed script migration to TypeScript with tsx.The seed script update from Node.js to
tsx prisma/seed.tsaligns with the TypeScript migration and modern tooling practices. This is consistent with the broader v7 migration pattern across the examples.Based on learnings: When analyzing seed script changes, the actual seed file content should be verified (which we did in the seed.ts review) rather than relying solely on package.json patterns.
15-16: Prisma dependency compatibility confirmed@prisma/[email protected], [email protected], and @prisma/[email protected] are fully compatible and support engineType = "client" (GA since v6.16.0).
orm/nuxt-prisma-module/prisma/schema.prisma (1)
4-8: No action required: generator output path matches imports Thelib/prismafile re-exports from../prisma/generated/prisma/client, andseed.tscorrectly imports from../lib/prisma, so paths align as expected.orm/betterauth-nextjs/prisma/schema.prisma (1)
7-11: All Prisma imports updated
No remaining@prisma/clientimports in orm/betterauth-nextjs; all references now use@/generated/prisma/client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
orm/react-router-7/package.json (1)
12-12: Prisma packages still on v6 instead of v7
Both@prisma/client(Line 12) andprisma(Line 22) remain pinned to6.16.3, but this PR targets Prisma v7. Please bump both to a 7.x.y release (e.g.,7.0.0), reinstall to refresh the lockfile, and verify the example still builds.Also applies to: 22-22
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
orm/nuxt-prisma-module/package.json(1 hunks)orm/react-router-7/package.json(1 hunks)orm/solid-start/package.json(2 hunks)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.nvmrc(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (26)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/graphql-subscriptions)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/sveltekit)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/solid-start)
This reverts commit 5763c56.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
.github/tests/orm/nuxt/run.sh(1 hunks).nvmrc(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Applied to files:
.github/tests/orm/nuxt/run.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/graphql-auth)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/sveltekit)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/solid-start)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
orm/nuxt/prisma/seed.ts (1)
53-62: Consider using upsert for idempotent seeding.The current seed implementation uses
create()in a loop, which will fail on subsequent runs if there's a unique constraint on theupsert()instead would make the seed idempotent and allow it to be run multiple times safely.Apply this diff to make the seed idempotent:
async function main() { console.log(`Start seeding ...`) for (const u of userData) { - const user = await prisma.user.create({ - data: u, + const user = await prisma.user.upsert({ + where: { email: u.email }, + update: {}, + create: u, }) console.log(`Created user with id: ${user.id}`) } console.log(`Seeding finished.`) }This change assumes that
whereclause accordingly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
orm/nuxt/prisma/seed.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Applied to files:
orm/nuxt/prisma/seed.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/nest-graphql)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
orm/nuxt/prisma/seed.ts (1)
56-59: Consider using upsert for idempotent seeding.The current implementation uses
create(), which will fail with duplicate key errors if the seed script is run multiple times. Usingupsert()would make the seed script idempotent and more robust.Apply this diff to make seeding idempotent:
for (const u of userData) { - const user = await prisma.user.create({ - data: u, + const user = await prisma.user.upsert({ + where: { email: u.email }, + update: {}, + create: u, }) - console.log(`Created user with id: ${user.id}`) + console.log(`Created/updated user with id: ${user.id}`) }
♻️ Duplicate comments (1)
orm/nuxt/prisma/seed.ts (1)
1-1: Verify import path matches schema output configuration.The import uses
./generated/client, but schema.prisma showsoutput = "./generated". Verify the client is atprisma/generated/client/or if the import should be./generated(without/clientsuffix). This is the same concern as in db.ts.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
.gitignore(1 hunks)orm/nuxt/package.json(1 hunks)orm/nuxt/prisma/db.ts(1 hunks)orm/nuxt/prisma/schema.prisma(1 hunks)orm/nuxt/prisma/seed.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-22T12:12:43.161Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-turbopack/components/quotes.tsx:1-1
Timestamp: 2025-08-22T12:12:43.161Z
Learning: In Next.js applications using Prisma, the connection() function from 'next/server' serves a different purpose than 'export const dynamic = force-dynamic'. The connection() function ensures proper database connection context and request isolation, while dynamic = 'force-dynamic' only controls rendering strategy. Both should be used together and are not redundant.
Applied to files:
orm/nuxt/prisma/db.ts
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Applied to files:
orm/nuxt/package.jsonorm/nuxt/prisma/seed.ts
🔇 Additional comments (5)
.gitignore (1)
7-7: LGTM!Expanding from
generated/prisma/togenerated/is appropriate given the schema configurations now output to./generatedpaths across multiple examples. This broader pattern is more maintainable.orm/nuxt/package.json (3)
14-15: LGTM! Prisma versions are in sync.The
@prisma/clientand@prisma/extension-accelerateversions are appropriate and align with the updated schema configuration.
23-24: LGTM! Seed script configuration is correct.The
prismadev dependency andtsxare properly configured for the seed script. The seed commandtsx prisma/seed.tsaligns with the Prisma seeding best practices.
12-20: Install missing Prisma database adapter.The schema uses
provider = "prisma-client"withengineType = "client", which requires a database driver adapter. For PostgreSQL, add@prisma/adapter-pg(or the appropriate adapter for your target database).Add the adapter to dependencies:
"dependencies": { "@nuxt/eslint": "1.9.0", "@prisma/client": "^6.17.1", + "@prisma/adapter-pg": "^6.17.1", "@prisma/extension-accelerate": "^2.0.2", "eslint": "^9.0.0",Then configure the adapter in your Prisma client initialization (e.g., in
prisma/db.ts).Based on learnings.
Likely an incorrect or invalid review comment.
orm/nuxt/prisma/db.ts (1)
2-2: Validate Prisma client import path
Failed to locateorm/nuxt/prisma/generated/client. Ensure you’ve runprisma generateso thatschema.prisma’soutput = "./generated"produces the client folder, and update the import inorm/nuxt/prisma/db.tsto the correct path (./generatedor./generated/client).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
orm/nuxt/prisma/schema.prisma (1)
2-4: Confirm the JS engine adapter is installed.Switching the generator to
provider = "prisma-client"withengineType = "client"requires a matching driver adapter (e.g.@prisma/adapter-postgresql) to be installed and supplied when instantiatingPrismaClient. Without it, runtime connection will fail. Please double-checkorm/nuxt/package.jsonand the Prisma bootstrap code to ensure the adapter dependency is present and wired up.Run this to confirm the dependency is declared:
#!/bin/bash # Expect at least one @prisma/adapter-* entry in orm/nuxt/package.json rg -nP '@prisma/adapter-' orm/nuxt/package.json
🧹 Nitpick comments (1)
orm/nuxt/prisma/db.ts (1)
1-1: Consider updating the comment to reference Nuxt instead of Next.js.The comment references Next.js documentation, but this is a Nuxt example. While the singleton pattern is similar, the comment could be updated to be more generic or reference Nuxt-specific documentation to avoid confusion.
-// https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices +// Singleton pattern to prevent multiple PrismaClient instances in development +// See: https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/nextjs-prisma-client-dev-practices
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.gitignore(1 hunks)orm/betterauth-nextjs/package.json(1 hunks)orm/nuxt/package.json(1 hunks)orm/nuxt/prisma/db.ts(1 hunks)orm/nuxt/prisma/schema.prisma(1 hunks)orm/nuxt/prisma/seed.ts(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- .gitignore
🚧 Files skipped from review as they are similar to previous changes (3)
- orm/nuxt/prisma/seed.ts
- orm/nuxt/package.json
- orm/betterauth-nextjs/package.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-22T12:12:43.161Z
Learnt from: FGoessler
PR: prisma/prisma-examples#8260
File: generator-prisma-client/nextjs-starter-turbopack/components/quotes.tsx:1-1
Timestamp: 2025-08-22T12:12:43.161Z
Learning: In Next.js applications using Prisma, the connection() function from 'next/server' serves a different purpose than 'export const dynamic = force-dynamic'. The connection() function ensures proper database connection context and request isolation, while dynamic = 'force-dynamic' only controls rendering strategy. Both should be used together and are not redundant.
Applied to files:
orm/nuxt/prisma/db.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/solid-start)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/react-router-7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
orm/nuxt-prisma-module/.gitignore (1)
31-31: Approve.gitignoreupdate:prisma/generatedcorrectly ignores the./prisma/generated/prismaoutput; you can optionally add a trailing slash (prisma/generated/) for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (2)
orm/react-router-7/package.json (1)
12-12: Prisma version mismatch persists — PR targets v7 but packages remain at 6.18.0.The previous review flagged this critical issue, but it remains unresolved. The PR objective states "update fullstack examples in
/ormfor v7," yet@prisma/client(line 12) andprisma(line 27) are both pinned to^6.18.0instead of a 7.x.y release.Confirm whether:
- The PR should upgrade to Prisma v7 (e.g.,
^7.0.0or later), or- The PR objective terminology should be updated to reflect that this is a v6 update focused on the "prisma-client" generator migration.
If upgrading to v7, apply this diff:
- "@prisma/client": "^6.18.0", + "@prisma/client": "^7.0.0",- "prisma": "^6.18.0", + "prisma": "^7.0.0",Then run
npm installto refresh the lockfile and verify no additional breaking-change adjustments are needed in code or schema.Also applies to: 27-27
orm/solid-start/package.json (1)
23-27: Tailwind and PostCSS plugin versions remain misaligned—duplicate issue from past review.Lines 23 and 26 still have
@tailwindcss/[email protected]paired with[email protected]. Lockstep release pairs must remain in sync on patch versions to avoid build/runtime breakage.Apply this diff to re-align the versions:
- "tailwindcss": "4.1.11", + "tailwindcss": "4.1.13",
🧹 Nitpick comments (1)
orm/betterauth-nextjs/package.json (1)
10-29: Inconsistent versioning strategy across dependencies.The file mixes caret ranges (^6.18.0 for @prisma packages, ^2.0.2 for extension-accelerate) with exact versions (1.3.24 for better-auth, 15.5.4 for next, 4.1.14 for tailwindcss, 5.9.3 for typescript). This inconsistency can lead to unexpected minor version updates when dependencies are reinstalled. Consider adopting a consistent versioning strategy across the project, especially for critical packages like @prisma/client and next.
Consider standardizing to exact versions for production stability:
"dependencies": { - "@prisma/client": "^6.18.0", - "@prisma/extension-accelerate": "^2.0.2", + "@prisma/client": "6.18.0", + "@prisma/extension-accelerate": "2.0.2", "better-auth": "1.3.24",Alternatively, document the versioning strategy in the project README or a lock file comment explaining when to use caret vs exact ranges.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
orm/betterauth-nextjs/package.json(1 hunks)orm/nextjs/package.json(2 hunks)orm/nuxt-prisma-module/package.json(1 hunks)orm/nuxt/package.json(1 hunks)orm/react-router-7/package.json(2 hunks)orm/solid-start/package.json(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- orm/nextjs/package.json
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: AmanVarshney01
PR: prisma/prisma-examples#8327
File: orm/graphql-auth/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:59.096Z
Learning: The "prisma-client" generator provider (introduced in Prisma v6) is the newer, ESM-ready alternative to "prisma-client-js". It requires an explicit output path and is better suited for modern runtimes, edge deployments, and will become the default in Prisma v7. Use "prisma-client" for new projects or when modernizing existing projects.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/nextjs-trpc)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/graphql-auth)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/graphql-subscriptions)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/solid-start)
- GitHub Check: test (orm/sveltekit)
🔇 Additional comments (7)
orm/react-router-7/package.json (1)
16-16: Minor: Clarify isbot downgrade.
isbotwas downgraded from 5.1.30 to 5.1.28 (line 16). This is unusual—typically dependencies move forward, not backward. Confirm this is intentional (e.g., to fix a regression or compatibility issue) rather than accidental.orm/solid-start/package.json (2)
27-27: Verify whether tsx downgrade is intentional.Line 27 downgrades
tsxfrom4.20.6to4.20.3, which is unusual given that other dependencies are being upgraded. This patch-level downgrade may be unintended.Please clarify whether this downgrade was deliberate or should be reverted to
4.20.6.
13-14: Prisma version upgrades align with v7 migration goals.The bumps to
@prisma/client@^6.18.0,@prisma/extension-accelerate@^2.0.2, andprisma@^6.18.0are appropriate for the Prisma v7 migration. These versions support the newprisma-clientgenerator provider referenced in the schema changes and are compatible with the modern ESM-ready client ecosystem.Also applies to: 25-25
orm/nuxt-prisma-module/package.json (1)
10-10: Configuration updates align with v7 and Nuxt 4 migration.The postinstall script, Nuxt version bump to 4.1.2, and seed script change to use
tsxfor TypeScript support look appropriate for a modern Nuxt + Prisma setup.Also applies to: 26-26
orm/nuxt/package.json (2)
5-11: Scripts section looks good for Nuxt 4 setup.The added
generate,preview, andpostinstallscripts align with modern Nuxt 4 conventions.
21-28: DevDependencies and seed configuration align with TypeScript-first setup.The addition of
@types/node,prismaCLI, andtsxsupports the updated seed script pattern (tsx prisma/seed.ts). This transition from Node to TypeScript execution is consistent with the PR's modernization goals.orm/betterauth-nextjs/package.json (1)
5-9: The review comment is incorrect—no lint script was removed.Verification of the git history (HEAD~1) confirms the previous version of
orm/betterauth-nextjs/package.jsoncontained identical scripts:dev,build, andstart. No lint script has ever existed in this package's npm scripts. ESLint remains available viaeslint.config.mjsand installed devDependencies (eslint9.36.0,eslint-config-next15.5.4), allowing linting throughnpx eslintor IDE integration. Additionally, this package is not referenced in any CI/CD workflow and has no pre-commit enforcement, so there is no pipeline impact.Likely an incorrect or invalid review comment.
ed50811 to
16a848c
Compare
prisma-clientand QCSummary by CodeRabbit